package com.nbicc.authentication.vo;

import com.fasterxml.jackson.annotation.JsonView;
import com.nbicc.myshiro.authc.MyShiroUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;

/**
 * @Author: lilingyan
 */
@ApiModel(value="用户信息" , description = "用户接收用户账号密码等校验信息(传输层对象)")
@Data
public class User extends MyShiroUser {

    public interface UserSimpleView{};
    public interface UserDetailView extends UserSimpleView{};

    @ApiModelProperty(value="用户名" , notes = "不能为空")
    @NotEmpty(message = "账号不能为空")
    @JsonView(User.UserSimpleView.class)
    private String loginName;

    @ApiModelProperty(value="密码" , notes = "不能为空")
    @NotEmpty(message = "密码不能为空")
    private String password;

}
